package com.zc.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zc.dao.IPowerFactorDao;
import com.zc.domain.Item;
import com.zc.service.PowerFactorService;

@Service(value="powerFactorService")
public class PowerFactorServiceImpl implements PowerFactorService{
	@Autowired
	private IPowerFactorDao powerFactorDao;
	@Override
	public List<Item> getSubPowerFactor() {
		List<Item> powerFactorData=powerFactorDao.getPowerFactor("ftsjsggy_live");
		for(Item i:powerFactorData) 
			i.setTimeStamp(i.getTimeStamp().substring(10));
		return powerFactorData;
	}
	@Override
	public List<Item> getMainPowerFactor() {
		List<Item> powerFactorData=powerFactorDao.getPowerFactor("mtsjsggy_live");
		for(Item i:powerFactorData) 
			i.setTimeStamp(i.getTimeStamp().substring(10));
		return powerFactorData;
	}
}
